home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / gs24src.zip / OSTACK.H < prev    next >
C/C++ Source or Header  |  1992-02-09  |  2KB  |  35 lines

  1. /* Copyright (C) 1991 Aladdin Enterprises.  All rights reserved.
  2.    Distributed by Free Software Foundation, Inc.
  3.  
  4. This file is part of Ghostscript.
  5.  
  6. Ghostscript is distributed in the hope that it will be useful, but
  7. WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  8. to anyone for the consequences of using it or for whether it serves any
  9. particular purpose or works at all, unless he says so in writing.  Refer
  10. to the Ghostscript General Public License for full details.
  11.  
  12. Everyone is granted permission to copy, modify and redistribute
  13. Ghostscript, but only under the conditions described in the Ghostscript
  14. General Public License.  A copy of this license is supposed to have been
  15. given to you along with Ghostscript so you can know your rights and
  16. responsibilities.  It should be in a file named COPYING.  Among other
  17. things, the copyright notice and this notice must be preserved on all
  18. copies.  */
  19.  
  20. /* ostack.h */
  21. /* Definitions for Ghostscript operand stack */
  22.  
  23. /********************************
  24.  * NOTE: on MS-DOS systems, the operand stack is stored in the data segment.
  25.  * This leads to large performance gains, at the expense of having to swap
  26.  * the stack explicitly when switching contexts or handling segment under-
  27.  * or overflow (none of which are implemented yet!).
  28.  ********************************/
  29. typedef ref _ds *os_ptr;
  30. extern os_ptr osbot, osp, ostop;
  31.  
  32. /* Macro to ensure enough room on the operand stack */
  33. #define check_ostack(n)\
  34.   if ( ostop - osp < (n) ) return e_stackoverflow
  35.